from app.services.user_service import UserService

# 实例化用户服务
user_service = UserService()


def get_users(page=1, per_page=10):
    """获取用户列表"""
    return user_service.get_all_users(page, per_page)


def get_user_by_id(user_id):
    """根据ID获取用户"""
    return user_service.get_user_by_id(user_id)


def create_user(user_data):
    """创建用户"""
    return user_service.create_user(user_data)


def update_user(user_id, user_data):
    """更新用户信息"""
    return user_service.update_user(user_id, user_data)


def delete_user(user_id):
    """删除用户"""
    return user_service.delete_user(user_id) 